awm_m11p_sources = files(
  'awm_m11p_abi.cpp',
  'awm_m11p_card.cpp',
  'awm_m11p_gpu.cpp',
  'awm_m11p_memory.cpp',
) + interface_sources

libawm_m11p = shared_library(
  'awm_m11p',
  awm_m11p_sources,
  include_directories: include_dirs + innosilicon_interface_inc,
  dependencies: [dev_deps],
  name_prefix: 'lib',
  name_suffix: 'so',
  install: true,
  install_dir: drivers_install_dir,
)

if build_tests and meson_build
  custom_target(
    'copy_libawm_m11p',
    output: 'copy_libawm_m11p',
    command: ['cp', libawm_m11p.full_path(), drivers_install_dir],
    depends: libawm_m11p,
    build_by_default: true,
  )
endif